
class GoogleSearch:
	def getCompanyHomepage(self,comanyName):
		from xgoogle.search import GoogleSearch, SearchError
		try:
			gs = GoogleSearch(comanyName)
			gs.results_per_page = 50
			results = gs.get_results()
			for res in results:
				return res.url.encode('utf8')
			return ""
		except (SearchError, e):
			return ""

'''if __name__ == '__main__':
	print GoogleSearch().getCompanyHomepage("TNR International Co., Ltd")
'''


